package com.wskj.controller.common;


import com.wskj.common.core.controller.BaseController;
import com.wskj.system.service.ISysUserService;
import com.wskj.workbench.service.ITbUserJoinOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Api(tags = "微信支付回调异步接口")
@AllArgsConstructor
@RestController
@RequestMapping("/api/pay")
@Slf4j
public class ApiPayCallbackController extends BaseController {

    private final ITbUserJoinOrderService tbUserJoinOrderService;


    /**
     * @description: 微信回调
     * @author: kubilewang
     * @date: 2022/9/1 16:24
     * @param:
     * @param: request
     * @param: response
     * @Return: void
     **/
    @ApiOperation("微信回调")
    @PostMapping("/wx/payNotify")
    public void wxPayNotify(HttpServletRequest request, HttpServletResponse response) throws Exception {
        tbUserJoinOrderService.wxPayNotify(request, response);
    }

}
